package com.accompany.utils;
import android.content.Context;
import android.widget.Toast;

import com.accompany.main.BaseApplication;
import com.sdsmdg.tastytoast.TastyToast;

/**
 * Created by HeQian on 2017/4/18.
 * <p>
 * 展示吐司工具类
 */

public class ToastUtil {
    /**
     * 展示吐司的方法
     *
     * @param text
     */
    public static void showshortToast(String text) {
        Toast.makeText(BaseApplication.getContext(), text, Toast.LENGTH_SHORT).show();
    }

    public static void showlongToast(String text) {
        Toast.makeText(BaseApplication.getContext(), text, Toast.LENGTH_SHORT).show();
    }

    //SUCCESS
    public static void showToastSUCCESS(Context context, String str) {
        TastyToast.makeText(context, str, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);
    }

    //CONFUSING 混乱迷惑
    public static void showToastCONFUSING(Context context, String str) {
        TastyToast.makeText(context, str, TastyToast.LENGTH_SHORT, TastyToast.CONFUSING);
    }

    //
    public static void showToastDEFAULT(Context context, String str) {
        TastyToast.makeText(context, str, TastyToast.LENGTH_SHORT, TastyToast.DEFAULT);
    }
    //错误
    public static void showToastERROR(Context context, String str) {
        TastyToast.makeText(context, str, TastyToast.LENGTH_SHORT, TastyToast.ERROR);
    }

    public static void showToastINFO(Context context, String str) {
        TastyToast.makeText(context, str, TastyToast.LENGTH_SHORT, TastyToast.INFO);
    }
    //警告
    public static void showToastWARNING(Context context, String str) {
        TastyToast.makeText(context, str, TastyToast.LENGTH_SHORT, TastyToast.WARNING);
    }
}
